package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author stone
 * @date 2022/04/28 17:39
 */
@Controller
public class HelloController {

    //Handler方法的开发 → 该Handler方法和请求URL之间的关系要建立 → URL和Handler方法直接耦合在一起
    //value属性：请求url
    @RequestMapping("hello")
    @ResponseBody
    public String hello() {
        return "hello springmvc";
    }

    @RequestMapping("goodbye")
    @ResponseBody
    public String goodbye() {
        return "goodbye";
    }

}
